UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nmva0l0zSZdPu7fGSWYTPN/CX+XOSs5dZW2PHF86B7M='
WHERE
key_id = '1da16b83479fc289cbddbe07249101d1955d63cc073ca0c0ceac234bae51681b'
AND (
token = 'nmva0l0zSZdPu7fGSWYTPN/CX+XOSs5dZW2PHF86B7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)