UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SavLqqywP1WkFU9w6v1Xkqh4fN121nGS/Tmb7EjShRc=' 
WHERE 
  key_id = 'd0d95775d14be6b4e4d4331cc9ad61e26102e37f931864c22f8d6fdf976e8e4f' 
  AND (
    token = 'SavLqqywP1WkFU9w6v1Xkqh4fN121nGS/Tmb7EjShRc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00052