UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jznlurto0U6tTMFYdDERTgMO1Sde5GETrWsxPBycJ5g='
WHERE
key_id = '0912ad7becc77787858fc51becc5986429e15e2f497c2214b3d06213898d0a6a'
AND (
token = 'jznlurto0U6tTMFYdDERTgMO1Sde5GETrWsxPBycJ5g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)