UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's+oD+0kdZAEuP1jvbEvx8tXBYAbQ/8qwmaJT/OH6t6Y='
WHERE
key_id = '0f95f07930fc1edaedffb34bddf518a936da0c1a6fcac738e93de45645d598f1'
AND (
token = 's+oD+0kdZAEuP1jvbEvx8tXBYAbQ/8qwmaJT/OH6t6Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)