UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VTjYcZChqt0L7tfCG5Zh30s1BTS7MXRX2LA+rE8BJag='
WHERE
key_id = 'd26db1d59a3bd9e227af98ccfc7ec27bfcd945e73a87dd93737c55438975842b'
AND (
token = 'VTjYcZChqt0L7tfCG5Zh30s1BTS7MXRX2LA+rE8BJag='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)