UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q90FPwl5Ngagyph6N/FEoQWr+GBS+36/yq5KnTc7EFQ='
WHERE
key_id = 'cecfde7e1d1cff4d28ca785da54e328897e070aeabafd446342c8cb919db6028'
AND (
token = 'Q90FPwl5Ngagyph6N/FEoQWr+GBS+36/yq5KnTc7EFQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)