UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PakyUhuE/jQLCH0rOrX8OojKvMrSop+swL0iqZsgLbM='
WHERE
key_id = '86945557634f14107a73b79ffd3d69e6a4cc68b39d97121458d7cd0f33d37c10'
AND (
token = 'PakyUhuE/jQLCH0rOrX8OojKvMrSop+swL0iqZsgLbM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)