UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'R3nfjHU9erBcnVQFIAo6yT4ceTyxPp+zdEL2xqwiY30=' 
WHERE 
  key_id = 'b2fb3733a925b0c5573faf8afc0ea4f5f77f33de2ef7ce4261f1f5a8d24c1bb0' 
  AND (
    token = 'R3nfjHU9erBcnVQFIAo6yT4ceTyxPp+zdEL2xqwiY30=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041