UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Qf4De4UNLNEZARe8UC3OpNS5i3SVtyYUlHiKLl4poTY=' 
WHERE 
  key_id = '0acafe1f7c68291ecf575c568ea5547455143b8e448f4d2bcf3e7db38cdeed4f' 
  AND (
    token = 'Qf4De4UNLNEZARe8UC3OpNS5i3SVtyYUlHiKLl4poTY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018