UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iKsBkTmzOgDMe1IwJt9My6im144eP/OReqT37n5/0RA='
WHERE
key_id = '0ad124578d73d44db91f2cfa5e0fa20b3dddd04f128494a9db7f3a772bd49a41'
AND (
token = 'iKsBkTmzOgDMe1IwJt9My6im144eP/OReqT37n5/0RA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)