UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bkOQnKjPTCU8Z6bFNmEVMze89reI368p1+eUU1pzXZQ='
WHERE
key_id = '3cc44be75bf2e27b37e8c5a863017cdfe476fa62a7527a2d3dcb62f7f2809b26'
AND (
token = 'bkOQnKjPTCU8Z6bFNmEVMze89reI368p1+eUU1pzXZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)