UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3qC5uvvwbSwi4A31MVV1HhB1ZrP0lqPyGODmZlrzHRA='
WHERE
key_id = '53503cc9970fe56ad3609a6e46f622743aca1e338ebf674626886c197c8e955c'
AND (
token = '3qC5uvvwbSwi4A31MVV1HhB1ZrP0lqPyGODmZlrzHRA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)