UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'X8bUVnBVPaaGLrQQ55HySqpJi5KHHQDc2an6D/nbQw0='
WHERE
key_id = '14e6304e86120cdcfd7c6fb8ed59e547dc2afb21c4e51004004b5bdf335ea48d'
AND (
token = 'X8bUVnBVPaaGLrQQ55HySqpJi5KHHQDc2an6D/nbQw0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)