UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GqknK4PuohPjUT0/lS4FS/v1yTuxqZs22u68xhGANqU='
WHERE
key_id = '448601cbddafdd644534507cdad03c27295fd13ad90daef101376613314d29a1'
AND (
token = 'GqknK4PuohPjUT0/lS4FS/v1yTuxqZs22u68xhGANqU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)