UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8LB/zpqbvzrznRE4RmFHDZHoBLwwCmenLPU7BG7Ba6Q='
WHERE
key_id = '5208021c6a9c27ca57084a6888813b8d9f1b7200b5cd0957625c7a87731a8382'
AND (
token = '8LB/zpqbvzrznRE4RmFHDZHoBLwwCmenLPU7BG7Ba6Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)