UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jpDlbzkeqIbIVgzghN/Dh878RsZ8DyoFJ+1G4yXl4NY='
WHERE
key_id = '367290f9c7709844d1bda4148ce0f348d987dafb73b73e786917dbb6fcfef8ec'
AND (
token = 'jpDlbzkeqIbIVgzghN/Dh878RsZ8DyoFJ+1G4yXl4NY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)