UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RBdN+e/V0WaOx8xtjyOqNqLU7DeKEuKZKYWfbehUdBY='
WHERE
key_id = '62b485222211fb5050d309d7db26e4508907d6fc0f561dcd3d46aaf471dfbf68'
AND (
token = 'RBdN+e/V0WaOx8xtjyOqNqLU7DeKEuKZKYWfbehUdBY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)