UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'capXkdGspl46hihuPg56hBoy84JbE687Gbfhb93/Wqo=' 
WHERE 
  key_id = 'fa7eaddbd84dfa7a0e8ad07dc5fa7fc033340e9975d8b1f733600473aee21881' 
  AND (
    token = 'capXkdGspl46hihuPg56hBoy84JbE687Gbfhb93/Wqo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035