UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'y2rbPK/fpDHCWkieldFsyF6HvCItN/4RHx6LtzkK9EI=' 
WHERE 
  key_id = 'ca2cd5e5a7e1b2447b76fca41626a99e1650f0a67535c5f640b39535be6e2e80' 
  AND (
    token = 'y2rbPK/fpDHCWkieldFsyF6HvCItN/4RHx6LtzkK9EI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043