UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H1MfRoRDC6XcWlP3Iq/oP/LrsdnFNCPwJoVp/HVRtZY='
WHERE
key_id = '6fc543f4cfe7c9e0fd7f9aa249029bf3efba4049afb1be1b61698c5845cb8f68'
AND (
token = 'H1MfRoRDC6XcWlP3Iq/oP/LrsdnFNCPwJoVp/HVRtZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)