UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UJkfNzZRvUyFUAjpil2DRmlAHUCkSk5fz4hR/qvmHLg='
WHERE
key_id = '8115c13c41b228114cd5f7a805533e7ca9639a024cd464b4d1bb752bf75028e1'
AND (
token = 'UJkfNzZRvUyFUAjpil2DRmlAHUCkSk5fz4hR/qvmHLg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)