UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'z71Vxe+MzQ+mvPodwtwdwSrx3jq5ApOo8fcATFT9wp0=' 
WHERE 
  key_id = '2b1e1d5d9679e1718b76d88e8256691726da482a9ef270eab9c509ba573d0e54' 
  AND (
    token = 'z71Vxe+MzQ+mvPodwtwdwSrx3jq5ApOo8fcATFT9wp0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022