UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MzmPJ2ogbR/hFnVdMv7vKO/L6/czWUCS3FiMJFUEdKI=' 
WHERE 
  key_id = '35534069ee8940f86cdd2b37b46821455566111f6df5bbd26c4552205ad1d385' 
  AND (
    token = 'MzmPJ2ogbR/hFnVdMv7vKO/L6/czWUCS3FiMJFUEdKI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017