UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'k168e/f7Ek0z5+UdLWbj3BkZBO9P1wIyrZ+mF2zEPSI=' 
WHERE 
  key_id = '45515a989b1fecf8d3e9b2a3f732190aa153d030fd69275eaac7c269e988631c' 
  AND (
    token = 'k168e/f7Ek0z5+UdLWbj3BkZBO9P1wIyrZ+mF2zEPSI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017