UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ffrFVBJmMFOspMOt5Dsb/9WjpD//DSfHzlJ4bLfZhpA='
WHERE
key_id = '4494d914e03228398d0d269da323aaf233ffc4c2c2bab18e2adb28d4fae342a8'
AND (
token = 'ffrFVBJmMFOspMOt5Dsb/9WjpD//DSfHzlJ4bLfZhpA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)