UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GCJ8ZAhlSqjCcyyCw/2JQsT6865SC33PTP81U197RnM='
WHERE
key_id = '884466189d10b3c2dd228051d45595145ea04af5f3d5b9728e68cdb3efabbc2e'
AND (
token = 'GCJ8ZAhlSqjCcyyCw/2JQsT6865SC33PTP81U197RnM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)