UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vAjPKt54J2AuTek4dDNw4ClM9RYmhUH+IEMeDsB9sb4=' 
WHERE 
  key_id = '90ca8e16c1396c718b0530dcc50ea5758304bbf1adfbc3f81fc12f65b49bf3ac' 
  AND (
    token = 'vAjPKt54J2AuTek4dDNw4ClM9RYmhUH+IEMeDsB9sb4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00068