UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '50GxQRr2/AuGzmcYJUVOf6uhrYCzNftlV2WwtoAOgJY=' 
WHERE 
  key_id = '08e328d235a462a18d399d13c78bde586f735e764dd1ccfc4ea67fa6945bfc93' 
  AND (
    token = '50GxQRr2/AuGzmcYJUVOf6uhrYCzNftlV2WwtoAOgJY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00062