UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CmEPYPNlXkfeWHCIbmMOI+YLHpH37nD0MV73TRHSw+Y='
WHERE
key_id = '056f5faf25cdd20f129fbc3a592e9cb7660df75e2374d30b59cf2eeaa6252afb'
AND (
token = 'CmEPYPNlXkfeWHCIbmMOI+YLHpH37nD0MV73TRHSw+Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)